package org.jeecg.glr.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;

/**
 * @Description: 传感器管理实体类
 * @Author: jeecg-boot
 * @Date:   2020-02-11
 * @Version: V1.0
 */
@Data
@TableName("glr_sensor")
public class GlrSensor implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.UUID)
    private String id;
	/**创建人*/
	@Excel(name = "创建人", width = 15)
    private String createBy;
	/**创建日期*/
	@Excel(name = "创建日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;
	/**更新人*/
	@Excel(name = "更新人", width = 15)
    private String updateBy;
	/**更新日期*/
	@Excel(name = "更新日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
	/**所属部门*/
	@Excel(name = "所属部门", width = 15)
    private String sysOrgCode;
	/**所属公司*/
	@Excel(name = "所属公司", width = 15)
    private String sysCompanyCode;

	@Dict(dicCode = "glr_sensor_type")
	@Excel(name = "类型") private String type; //类型

	@Excel(name = "传感器编号") private String code; //传感器编号

	@Excel(name = "出厂编号") private String factoryCode;//出厂编号

	@Excel(name = "名称") private String name; //名称

	@Excel(name = "配置地址") private String ip; //配置地址

	@Excel(name = "帐号") private String account; //帐号

	@Excel(name = "密码") private String pwd; //密码

	@Excel(name = "手机卡") private String sim; //手机卡

	@Dict(dicCode = "glr_sensor_connection_type")
	@Excel(name = "连接方式") private String connectionType; //连接方式

	@Excel(name = "所属设备") private String relevanceId; //所属设备

	@Dict(dicCode = "glr_equipment_status")
	@Excel(name = "状态") private String status; //状态

	@Excel(name = "项目编号", width = 15) private String projectCode;  //	所属项目编号

	@Excel(name = "所属路灯灯杆编号") private String lightPoleCode;  //所属路灯灯杆编号

	private String materialCode;
	@Dict(dicCode = "glr_qu_yu")
	private String areaType;

	@Transient	private transient String  light; //灯杆信息
	@TableField(exist = false)
	private GlrSensorData glrSensorData;



}
